When an object having a given contour shape is subjected to recognition processing on a gray level image, a method of binarizing the gray level image representing a recognition object at a predetermined threshold has been conventionally known. The recognition processing based on binary data is easily affected by illumination variations, shading and so forth. Particularly when an X-ray transmitting image is processed, as in the inspection of a void in a soldered portion on a substrate, a lot of noises are produced on the image, so that a contrast between the object and a background is decreased. Accordingly, the image may, in some cases, be unrecognizable.
A method of subjecting a gray level image to normalized correlation operation processing using a model image of an object, to recognize the position of the object has been known. In recognition processing using a normalized correlation operation, the model image of the object must be previously set. Therefore, the method is unsuitable for a case where the size of the object varies. Further, the normalized correlation operation must be executed in each of scanning positions on the image, thereby increasing a hardware configuration and processing time. Particularly in order to measure the direction of the object, it is necessary to rotate the model image a predetermined angle at a time and execute the normalized correlation operation for each rotation angle position, thereby increasingly complicating a device configuration and processing.
In order to measure the position and the direction of an object in a contour shape having corners, for example, a chip component on a substrate, a method of tracking an edge on an image to specify straight lines corresponding to the contours of the object, then finding an equation of each of the straight lines, and further recognizing the position of a point of intersection of the plurality of straight lines found by the equations as the position of the component may, in some cases, be used. However, this method complicates processing such as the tracking of the edge and the operation of the equations.
With respect to an object having boundary lines whose shapes are point-symmetrical or an object like a polygon at least two sets of opposite sides of which are parallel, a method of measuring the position and the shape of the object using the direction of each of edges appearing on an image has been proposed (see JP-A-9-229646).
According to this method, a representative point of the object can be extracted with high precision without being affected by illumination variations and complicating a device configuration. In this method, however, a recognition object is limited to a polygon having boundary lines whose shapes are point-symmetrical or a polygon at least two sets of opposite sides of which are parallel. Accordingly, it is impossible to recognize an object whose contours are asymmetrical. A representative point finally found is a point in the contours of the object. Accordingly, it is difficult to apply this method to processing for extracting the corners of an object that is a polygon and measuring the direction of the object.